<template>
  <div class="resource-hub">
    <el-card :body-style="{ padding: '0px' }">
      <el-table border :data="data" style="width: 100%">
        <el-table-column prop="title" label="标题">
        </el-table-column>
        <el-table-column prop="link" label="链接" width="120">
          <template slot-scope="scope">
            <el-button type="primary" @click="handleClick(scope.$index)">下载</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: [
        { title: "Ps 密码：2erp", link: "https://pan.baidu.com/s/1Yyyo12x78QIsTqrLK5_o9w" },
        { title: "CameraRaw 密码：8z0j", link: "https://pan.baidu.com/s/1hQiHkdFhVYpVzzsg-cZIHA" },
        { title: "Lr 密码：2g92", link: "https://pan.baidu.com/s/14M0UG-MbqqyDdb0SU0lxmg" },
        { title: "胶卷插件 密码：vpr4", link: "https://pan.baidu.com/s/1LLvaqfel-d7l2aTxBdkzIw" },
        { title: "示波器 密码：pu75", link: "https://pan.baidu.com/s/1xoN7vIlaqsSd6bwAhiz-ww" },
        { title: "电子书集合 密码：fkvf", link: "https://pan.baidu.com/s/13_NJo_SqC7ViZUP3nHzX-w" },
        { title: "程序设计全套 密码：9w2m", link: "https://pan.baidu.com/s/1vlPHUCtiNwpdTbDC-AFA8A" },
        { title: "四六级资料合集 密码：vvt4", link: "https://pan.baidu.com/s/1Oq_HVVDm1Gkj897ySiogFA" },
        { title: "微信小程序教程 密码：tecj", link: "https://pan.baidu.com/s/1x2gV66WiSMpNe9_RQOOW5Q" },
        { title: "专插本公共课资料 密码：uazh", link: "https://pan.baidu.com/s/1Pu7e1c806S2zTBUuJvjRRA" }
      ]
    };
  },
  methods: {
    handleClick(index) {
      //   window.console.log(index, row);
      window.open(this.data[index].link);
    }
  }
};
</script>

<style lang="scss" scoped>
.resource-hub {
  padding-top: 25px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
</style>
